package com.example.controller;

import com.example.config.ResponseEntity;
import com.example.service.BackendApiService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
@CrossOrigin
public class BackendApiController {

    @Autowired
    BackendApiService backendApiService;

    @RequestMapping("/getall")
    public ResponseEntity getApis(){
        return ResponseEntity.success(backendApiService.getApis());
    }
}
